Hello... I am getting the hang of using filtering enabling to ensure user safety but I only know how to use it on Screen Gui related stuff. How can I make this Touched and TouchEnded function work with filtering enabled?
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local plr = workspace[hit.Parent.Name]
local player = game.Players:GetPlayerFromCharacter(plr)
player.PlayerGui.GeneralStoreMusic:Play()
end
end)
script.Parent.TouchEnded:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local plr = workspace[hit.Parent.Name]
local player = game.Players:GetPlayerFromCharacter(plr)
player.PlayerGui.GeneralStoreMusic.Playing = false
end
end)

1 comment
This is a waste. Why do this server-side at all?