Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[Solved] Why cant i just make a keydown detector that does chages to the server?

Asked by 5 years ago
Edited by User#5423 5 years ago

i have THIS simple script:

local Player = script.Parent.Parent
local Character = Player.Character or
Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local HumaoidRP = Character:WaitForChild("HumanoidRootPart")
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.G then
print("bag droped")
game.Workspace.Baseplate:Destroy()
end
end)

and the baseplae disappears fro the client (person clicking G) but i click server mode and the baseplate is still there and player goes right through it, how can i make a key down detector that makes a server change?

0
remoteevents EXpodo1234ALT 18 — 5y
0
it makes sense becasue this is in local script, but key down detect doesnt work in normal script! CommanderCaubunsia 126 — 5y
0
use remote events how!? CommanderCaubunsia 126 — 5y
0
wiki tutorial EXpodo1234ALT 18 — 5y
View all comments (3 more)
0
k CommanderCaubunsia 126 — 5y
0
> [Closed] CommanderCaubunsia 126 — 5y
0
add [Solved] if self solved User#5423 17 — 5y

Answer this question