Basically I have a keybind and if you hold a key it’ll activate a script which is a cframe, instead. The cframe just doesn’t happen.
Heres the code for the keybind…
UIS = game:GetService(“UserInputService”)
UIS.InputEnded:Connect(function(Input, isTyping)
if isTyping then return end
while true do
wait()
if UIS:IsKeyDown(Enum.KeyCode.D) then
workspace.cframer.Script.Disabled=false
wait()
end
UIS.InputEnded:Connect(function()
workspace.cframer.Script.Disabled = true
wait()
end)
end
end)
and heres the code for the cframe
while true do
script.Parent.CFrame=script.Parent.CFrame*CFrame.new(0,0,1.5)
wait()
end
(keybind script is in startplayerscripts, cframe is in a torso of a rig im trying to make move)
Chances are it’s a localscript activating a serverscript.
This doesn’t work because regular scripts are serversided, localscripts effect the client only.
They may seem difficult, but trust me, they aren’t. The most difficult thing nowadays after getting used to them is remembering that when called from a localscript it’ll pass the player as the first variable.
Think of RemoteEvent:FireServer() as a property change, and you are picking that change up from the server script.