So I have been trying to make a script where my text button when it is clicked will change a parts properties.
This is my script, yes a normal script.
script.Parent.MouseButton1Click:Connect(function() game.Workspace.Part.CanCollide = true game.Workspace.Part.Transparency = 0 end)
Can you please tell me what is wrong? Thank you.
It's wrong because it's not using FE.
Make sure this script is a local script:
script.Parent.MouseButton1Click:Connect(function() game.ReplicatedStorage.FireableEvent:FireServer() end)
In the ServerScriptService, make a server script.
local ReplicatedStorage = game:GetService("ReplicatedStorage") local Event = Instance.new("RemoteEvent", ReplicatedStorage) Event.Name = "FireableEvent" local function onFiredEventEvent(Player) game.Workspace.Part.CanCollide = true game.Workspace.Part.Transparency = 0 end Event.OnServerEvent:Connect(onFiredEventEvent)