✓ Accepted answer
#Reminders
Just a friendly reminder, that the TeleportService doesn't work in studio for reasons.
Also, try using the little blue button on your editing view to add in LUA code.
#Answers
The thing is, FilteringEnabled forces people to use RemoteEvents and RemoteFunctions. If you don't know what they are, click this: developer.roblox.com/en-us/api-reference/class/RemoteEvent
You can use a touch function to fire a RemoteEvent, and have a LocalScript ready to listen for the RemoteEvent. Take example:
Server Script
local Part = script.Parent
Part.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild('Humanoid') then
local player = game.Players[hit.Parent]
game.ReplicatedStorage.RemoteEvent:FireClient(player)
end
end)
Local Script
game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(function()
print("Your code here!")
end)
Try using this to help with your situation. Feel free to ask me in the comments if I made a typo, if you don't understand anything etc.
Hope I helped! ;)
4 comments
Where do I put the scripts??
No, it doesn't actually matter. The reason why RemoteEvents were made was because they get passed the Sever-Client barrier. Basically, in the past, you couldn't have a normal script execute something that a local script would do. To get past that, use RemoteEvents. Thanks for asking bud!
How does- Nvm ima just watch yt
Uh, okay. Best of luck, mate!