local Part = script.Parent
local Event = game.ReplicatedStorage:WaitForChild("RemoteEvent")
Event.OnServerEvent:Connect(function(Player)
Part.Touched:Connect(function()
local PlayerGui = Player:WaitForChild("PlayerGui")
local Ping = PlayerGui.PingGui.MainFrame.Ping
local Clone = Ping:Clone()
Clone.Parent = Ping .Parent
script:Destroy()
end)
end)
So basically it deletes for the whole server. How do I make it so it deletes for the client but though the server script and not from a separate local script?
you could use a local script to receive a OnClientEvent and destroy the script using the local script, im pretty sure its impossible to delete it locally if u dont use a local script
Use a RemoteEvent. In the Part.Touched script instead of destoying the script, fire the remoteEvent to the client of Player. In starterPlayerScripts make a localscript and listen for ClientEvents from the remoteEvents and then destroy the part. You can’t change things on a client only from the server nor can you the other way around. But i don’t see why you wouldn’t want to use another localscript.