Hello there,
I was messing around with the Default Template and while scripting i tried to make the game check if the LocalPlayer is sitting on Chair1 and if the Player is sitting on the Chair he should be assigned to the team "Russian Roulette". This is the Code i have so far. Please note that the Invisible Collider I made for Chair1 is a Part so the "Touched" function should work, However It doesnt print out anything, meaning that it doesnt even register the Touch, what am i doing wrong?
Btw im new to Roblox Studio
Thanks in advance!
local Chair1 = game.Workspace.ConstructionZone.CompleteHouse.Chair1.Collider
local Teams = game:GetService("Teams")
local Player = game:GetService("Players").LocalPlayer
local Character = game.Workspace:WaitForChild(Player.Name)
Player.Team = Teams.Chilling
function ConfirmC1()
print("C1 touched!")
Character.Team = Teams.RussianRoulette
Character.TeamColor = Teams.RussianRoulette.TeamColor
end
Chair1.Touched:Connect(ConfirmC1)
