#MAKING SOMETHING DISAPPEAR BUT ONLY FOR THE PLAYER THAT CLICKED ON IT
37 messages · Page 1 of 1 (latest)
Just do those changes on a local script, then it will only be done for the player that clicked it
Its on a local script I just can’t get the code right
It just won’t do it
Like idk why it not working
local clickdetector = script. Parent
local model = script.parent.parent.parent
part. clickdetector-mouseclick: connect (function()
model. part. Transparency = 1
model. part. CanCollide = false
model. partl. Transparency = 1
model. partl. CanCollide = false
model. part2. Transparency = 0
model. part2. CanCollide = true
model.part3. Transparency = 0
model. part3. CanCollide = true
end)
That’s the script
Idk what’s wrong with it
You never declared part
it shows it as soon as you copy the code into a text editor
You also have some other issues with space and some -, which should be a . But the main problem stems from the part not being declared
I don’t get it, I’m sorry if it’s obvious but I’m kinda new to coding
** You are now Level 1! **
Well you're telling the script to look at "part" but you never told it what part is
So then it's nil. And nil.Clickdetector doesn't exist
the code giving you a read line under the text (or green in this case due to the -) is it telling you that you missed something
How do I tell it what part
by declaring it
How do I do that
Hm, I would recommend first learning basic scripting terms
Updated for 2023, this is my Roblox scripting tutorial. In this episode, you'll be taught the essentials for getting started. Learn how to script on Roblox with just 30 minutes of content, by watching the entire series!
With the recommended plugin linked below, learn how to code in Lua much quicker by practising your skills alongside the tutori...
Bro you need to make a variable for the part first
And fix your syntax
Oh wait you can just do clickdetector.MouseClicked
U don't need part
He has also made errors like spelling parent with a lower case p, connect with a lower case c, etc. It would be good for him to first learn the basics of how computers read the code
Ye
You can prechew it. But at this point you're just building a house in a swamp
I still don’t get it
Put a click detector, in the loca script do in click event transparency = 0
Can touch disabled
can collide disabled
If that’s what you want
do you want to solve 1 problem and encounter a hundred others later on or learn the basics and not encounter those problems later on?
solving your script is no hard problem but that doesn't mean you'll come out of it benefiting anything if you still don't understand how to script in the first place
unless this is one off scenario and you don't plan to continue scripting in the future then you should probably watch this first
i mean i have a script backed up but when you click it everyone sees it :/
Client so it's only the Player
Who clicked it
[EVENT]
Set proprety and ur done
[END]