local scripts are based on the clients, they never runs slower, clients normally are faster ( depends on the fps )
Oh I didnt even notice that, do you think thats the issue?
So should I run an event, or put everything in one script?
put it on a local script. not a remote event just a local script they run faster and they donāt lag. it only lags on the client
Putting it in a local script doesnāt work, the player does not jump
okay. put all the pads in a folder then loop through them. then if the pad is touched make the humanoid.Jump =true
How exactly would I loop through them?
for i, pad in pairs(folder to pads) do
end
for _, pad in pairs(workspace.Pads:GetChildren()) do
end
then just do the pad.Touched now there isnāt a lag to the jump cause itās using 1 script
Thank you, Iām gonna test it and see how it goes
use the documentation to learn more and use the forums!
Hey I did what you said but it does not seem to work, did I do something wrong?
Local script inside the folder
local Player = game.Players.LocalPlayer
local Hum = Player.Character:FindFirstChild("Humanoid")
local GreenPads = game.Workspace.Platforms.StarterGreenPads
for i, pad in pairs(GreenPads:GetChildren()) do
pad.Touched:Connect(function()
if Hum then
Hum.Jump = true
print("Working")
end
end)
end
that script will make you jump forever
after the pairs, so if pad:IsA(āBasePartā) then
when i get home lemme make a script for you. and it will work
Alright thank you so much!
30 30
So I got it to work. Put a script in workspace / serverscriptservice or in the folder of startergreenpads.
local starterGreenPads = workspace:WaitForChild("StarterGreenPads")
for i, pad in pairs(starterGreenPads:GetChildren()) do -- Loop through the StarterGreenPads
if pad:IsA("BasePart") then -- If it's a part
pad.Touched:Connect(function(hit) -- Touched
local humanoid = hit.Parent:FindFirstChild("Humanoid") -- Find the Humanoid
if humanoid then -- If the humanoid is a humanoid
humanoid.Jump = true -- humanoid jumps!
end
end)
end
end
Thank you so much it definitely helps a lot!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.