Ok, so I have a local script. I tried
- game.Workspace.Part.Touched:Connect(function()
- if game.Players.LocalPlayer then
- game.Players.LocalPlayer.PlayerGui.ScreenGui.Enabled = true
But somehow all players see it.
Ok, so I have a local script. I tried
workspace.Part.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
end)
I tried that and can still see it.
can you send your new code combined with my code?
Yes.
game.Workspace.Part.Touched:Connect(function(hit)
local Players = game.Players:GetPlayerFromCharacter(hit.Parent)
if Players then
game.Players.LocalPlayer.PlayerGui.ScreenGui.Enabled = true
end
end)
Heres a modified one.
game.Workspace.Part.Touched:Connect(function(hit)
local Players = game.Players:GetPlayerFromCharacter(hit.Parent)
if Players then
Players.PlayerGui.ScreenGui.Enabled = true
end
end)
game.Workspace.Part.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild(“Humanoid”) then
script.Parent.Enabled = true
end
end)
Put local script in screen gui
I copied and pasted that, all players can still see that. Im starting to wonder if studio is having issues.
This worked! Thanks so much! Been going through troubles.