I wanna make a lil like this that when i step on the red button i get a red highlight
when i step on the blue part i dont die but when i step on the red i dont
I wanna make a lil like this that when i step on the red button i get a red highlight
just add a hightlight to the player character using .touched event
and how do u do that
ghihtd9grydytgdrfrygr
i just said how, just create a new instance (highlight) modify it and parent it to the player’s character on touch
yeah but how would you make the script, how would you script it?
cant give out free scripts in devforum.
oh i thought a lot of people did that
dustwet7wt8wr
about the touched event, if i got the highlight, so lets say i got red hightlight, how would i make it so i can step on red parts but not on blue parts
makes teams and use if statements
Try this and modify the highlight to your liking.
local part = game.Workspace.Part1 -- part you want touched
local highlight = Instance.new("Highlight")
part.Touched:Connect(function(hit)
if game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil then
highlight.Parent = hit.Parent
else
return
end
end)
Alright thanks, and where do I put that script?
You can put it in the part you want touched, in ServerScriptService. There are many places you can put it.
oh dam it does work
erhgrtg8stgywg8gtiywrgd8yit
Now I gotta figure out to make the highlight the color i want the part to be touched, so if the hightlight turns red, i want to be able to step on red, and if i step on another color part i die
Personally I would put it in the part and do
local part = script.Parent -- part you want touched
You could do that with teams, I havent messed with them that much but it shouldnt be too hard. Basically just check if the player is on a certain team, give them the highlight and then in the death script for the colored part, check if they are on a certain team and kill them or don’t kill them.
One little tiny problem, I don’t know how to do any of that.
Read this and go to Team article.
Well yes, in this case how would u make it so when i step on red a button i join red team and when I step on blue button I join blue team?
Oh, nevermind I solved it myself, but thanks for the help!