Hi. Im trying to make a script where if you touch a part it changes your Walkspeed to 50. (FE)
local Remote = game:GetService("ReplicatedStorage"):FindFirstChild("RemoteEvents").WalkSpeed local players = game:GetService("Players") function addPlayer(player) Remote:FireServer() end for _,player in pairs(players:GetPlayers())do addPlayer(player) end players.PlayerAdded:connect(addPlayer)
thats the thing to fire the remotevent
game.ReplicatedStorage.RemoteEvents.WalkSpeed.OnServerEvent:Connect(function() workspace.Run.Touched:Connect(function() game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 50 end) end)
Thats where you actually touch the part
Hey there! There is no need to make this script FE compatible! It already is! (If you script it right.)
--Put this in a "Script" inside the part that has to be touched. local wsSetting = 50 Script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then hit.Parent.Humanoid.WalkSpeed = wsSetting end end
If you need any more help, let me know! ;)