This script is suppose to change the camera to first person and the other line is suppose to change the character walkspeed to 14 using a part and I need it to stay that way even if the player leaves the touching area of the part but after the player touches the part, it's not changing the walk speed or the camera distance and there's no error coming out in Output. Any help would be appreciated.
local function onTouched(part) local h = part.Parent:FindFirstChild("Humanoid") local speed = game.StarterPlayer local FPS = game.StarterPlayer if h then speed.CharacterWalkSpeed = 14 FPS.CameraMaxZoomDistance = 0.5 end end script.Parent.Touched:connect(onTouched)
Note: No, don't tell me to just use the properties in StarterPlayer instead of a script because I have several parts that the player needs to touch that changes their walkspeed and camera distance.