Question 1 : How can i detect when a player touched the part?
Question 2 : How can i make it make it do something when the player touched it?
Question 3 : Where do i have to put the script in?
Thx for reading this. Have a nice day ![]()
Question 1 : How can i detect when a player touched the part?
Question 2 : How can i make it make it do something when the player touched it?
Question 3 : Where do i have to put the script in?
Thx for reading this. Have a nice day ![]()
In a script use
script.Parent.Touched:Connect:function(hit), i suppose the script would be inside the part so when something touches the part this will detect it.
You’ll need to set up a script to do so, use the .Touched property and write inside the script what you want to happen.
Preferebly inside the part.
Hope i helped ![]()
And how can i write what i want to happen or can u send me the script i want that if u touch it, it would pop confetti out of it just for a second
First of all you’ll need to have the confetti particle, then insert the particle inside the part and in the particle’s properties turn Enabled off.
Then do something that when the player touches the part it will set the .Enabled to true.
And, how can i write that in a script? Bc apparently im not an programmer so i don’t really know how to put that in a script.
script.Parent.Touched:Connect(function()
script.Parent.ParticleEmitter.Enabled = true
end)
Tysm for helping me out!! Have a nice day bye.
Hello, I just wanted to send you a better script as the current solution will fire if anything touches the part and not just a player. Here’s a better script:
script.Parent.Touched:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr then
script.Parent.ParticleEmitter.Enabled = true
end
end)
Tysm. Have a nice day and NEVER GIVE UP.