Ok so im really new to lua but im currently making a game and i have a button with clickdetetctor and all of that so i have a remote event i put a script inside the remote events when i start the game the remote events fires by itself can anyone help me?
(it destroys a door when you push the button)
Why use RemoteEvents? The RemoteEvent make a connection with the clients and the server. Why use RemoteEvent? Recently ROBLOX make a update to against the hackers. In this update ROBLOX have insert the "FilteringEnabled". This fonction send information of the server to the client, but block the client informations to the server.
How to use it? FireServer --> send informations client to server FireClient --> send informations to specific client FireAllClients -- > send informations to all clients of the server
Now know than Script (ServerScript) is for the server and LocalScript (ClientScript) for the client. And not inverse because that not work.
For your script, you don't have need a RemoteEvent
Script/ServerScript
script.Parent.MouseClick:Connect(function(player) -- Who have clicked? script.Parent.Parent:Destroy() -- What do you destroy? end)
Solved your question? Put in title [SOLVED] or accept a answer.