I have a script that is supposed to make certain bricks appear for the player when they touch a brick, it works fine except for the fact that other players can also see it when they're not supposed to.
This is my code:
local CrashBlocks = game.Workspace.crash:GetChildren()
local function onTouch(hit)
for i, v in pairs(CrashBlocks)do
v.Transparency = 0
v.CanCollide = true
end
end
game.Workspace.speed1.Touched:Connect(onTouch)
local debounce = false
local sound = game.Workspace.soundeffects.Explosion
game.Workspace.speed1.Touched:Connect(function(hit)
if not debounce then
debounce = true
sound:Play()
wait(3)
debounce = false
end
end)
My understanding of local scripts is that they will only appear on the players client, apologies if I'm missing something super obvious here, I'm really new.

2 comments
Do fireclient()
If you don't understand , take a look at remote events