Since this code is complicated, I will post it here incase you run into an error. However, this is not an excuse to just copy the code. Please follow the tutorial and learn from it. Thanks! Code: --{{ SERVICES }}-- local Players = game:GetService("Players") local RunService = game:GetService("RunService") --{{ VARIABLES }}-- local player = Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local Function local lastPlatformCFrame --{{ FUNCTIONS }}-- local function onCharacterDied() Function:Disconnect() end local function onHeartbeat() local rootPart = character:WaitForChild("HumanoidRootPart") local raycastParams = RaycastParams.new() raycastParams.FilterDescendantsInstances = {character} raycastParams.FilterType = Enum.RaycastFilterType.Exclude local raycastResult = workspace:Raycast(rootPart.Position, Vector3.new(0, -50, 0), raycastParams) if raycastResult and raycastResult.Instance.Name == "Platform" then local platformCFrame = raycastResult.Instance.CFrame if lastPlatformCFrame then local rel = platformCFrame * lastPlatformCFrame:inverse() rootPart.CFrame = rel * rootPart.CFrame end lastPlatformCFrame = platformCFrame else lastPlatformCFrame = nil end end character:FindFirstChild("Humanoid").Died:Connect(onCharacterDied) Function = RunService.Heartbeat:Connect(onHeartbeat)
Rusty, i wanna say thanks to you for the tycoon series, am so excited when will my tycoon game get completed. Everything worked, i added walls,more powerful dropper and many other things.idk why many people get unwanted errors but mine was perfect, animation worked, bugs got fixed.. the only mistake i made was, i forgot to update the tycoon in server storage, which made me confusing😅
I’m curious as to why you didn’t just use BodyVelocity or constraint movers like VectorForce or LinearVelocity. At that point, scripting wouldn’t be necessary since platforms that move using constraint movers already move the player along it (unless you wanted the platform to move forward and back like in the video)
Good Video rusty, I have a similar movement part local TweenService = game:GetService("TweenService") local part = script.Parent local info = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, -1, true) local newPosition = part.Position + Vector3.new(0, 10, 0) local tween = TweenService:Create(part, info, {Position = newPosition}) tween:Play()
this is an awesome video its really helpful but i see a few other people having the same issue as me of typing it perfectly and it still not working do you have any ideas to a common mistake we might be making I've tried several times and even copied your code comment but still nothing, thank you.
can you test my games? user:Testingacc691 games:Slime attack!!! , Persent obby etc and also can you recreate the tycoon series because it didnt work.Can you just put the scripts in the description?
Hey great video the local script works but for some reason the tween script isn't working for me or i typed it wrong even tho reckecked it numerous times so i used this tween script then it works: local TweenService = game:GetService("TweenService") local Info = TweenInfo.new( 5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, math.huge, true, 0 ) local Goals = { CFrame = game.Workspace.Endpoint.CFrame } local Move = TweenService:Create(script.Parent, Info, Goals) wait(1) Move:Play()