So I'm making a parkour game and at some point the block goes up, then down, and up, and down and you have to time it. The problem is I don't know anything about script so I had a friend helping me but his script tends to lag a lot. If you're having WiFi problems the obstacle will teleport and if you're on it, you'll fall through the obstacle. Someone told me try to use "body velocity" and it might help reduce lag. I don't really know how to do any of that. Could anyone help me do it?
Ok, so this is my first time helping someone but I recommend using TweenService Im not sure how much this will affect performance but ill give u an example below(in case u wanna use it)
local TweenService = game:GetService("TweenService") local part = WHATEVER PART local goal = {} goal.CFrame = Part.CFrame * CFrame.new(0, 50, 0) local tweenInfo = TweenInfo.new( 5, -- Time Enum.EasingStyle.Quart, -- EasingStyle Enum.EasingDirection.Out, -- EasingDirection -1, -- RepeatCount (when less than zero the tween will loop indefinitely) true, -- Reverses (tween will reverse once reaching it's goal) 1 -- DelayTime ) local tween = TweenService:Create(part, tweenInfo, goal) tween:Play()
I haven't tested this out so I 110% doubt it would work but its just to give u an idea if you want, u can check out some examples or tutorials on youtube or go read up on TweenService at
https://developer.roblox.com/en-us/api-reference/class/TweenService
so uhh this is my first post on this website so like later today ill edit it if I realise I can make it more appealing or if its breaking any rules
hope this helped
You might want to use CFrame.
local platform = script.Parent --Set this to the part you want to move up and down. while true do --While loop repeats it for i = 0, 100 do platform.CFrame = platform.CFrame*CFrame.new(0, .5, 0) --Moves the platform up half a stud 100 times (total 50 studs) wait(.001) end for i = 0, 100 do platform.CFrame = platform.CFrame*CFrame.new(0, -.5, 0) --Moves the platform down half a stud 100 times (total 50 studs) wait(.001) end wait(.1) --Prevents while loop from crashing the game. end
Closed as Not Constructive by hiimgoodpack and Ziffixture
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?