Oh yeah, there’s no space between Room and 000
So… I’ve removed the space. Changed all the scripts effecting the space to remove it… AND STILL DOESN’T WORK?..
If it would make you feel any better, I’ll give you this part that I made to test your code. It works perfectly fine for me, but it makes use of players touching the door instead of cards. Just use the code for a reference.
Door.rbxm (2.8 KB)
Also - How in the actual world do I open .rbxm files? It just opens notepad?
You have to drag them into an open studio place
I think I found the problem quite embarassed for not seeing this
local db = false
script.Parent.DoorMain.Touched:Connect(function(handle)
print(handle.Parent.Name)
if db == false then
db = true
if handle.Parent.Name == 'Room'.. script.Parent.Configuration.RoomNumber.Value then
script.Parent.DoorMain.Transparency = 1
script.Parent.DoorMain.CanCollide = false
wait(1)
script.Parent.DoorMain.Transparency = 0
script.Parent.DoorMain.CanCollide = true
else
print("Wrong card")
end
db = false
end
end)
Your card name is “Room201” but the code says “Card201”
Nope, xD.
Hm, let me check it out.
Alright, whenever I put the card in StarterPack, and I’m not inserting it… It just… works? But whenever I use the script… It wont?
It’s because you’re parenting the card to ReplicatedStorage and not a player’s backpack?
Yes, but whenever I do however, set the cards parent to the backpack of the player, it doesnt work…?
What’s your script to give players a card?
local RoomTool = game:GetService('ReplicatedStorage'):WaitForChild('WC_Assets'):WaitForChild('Room'):Clone()
RoomTool.Name = 'Room'..script.Parent:WaitForChild('Configuration'):WaitForChild('RoomNumber').Value
RoomTool.Parent = game:GetService('Players'):WaitForChild('wayIxn').Backpack
local db = false
script.Parent.DoorMain.Touched:Connect(function(handle)
print(handle.Parent.Name)
if db == false then
db = true
if handle.Parent.Name == 'Room'.. script.Parent.Configuration.RoomNumber.Value then
script.Parent.DoorMain.Transparency = 1
script.Parent.DoorMain.CanCollide = false
wait(1)
script.Parent.DoorMain.Transparency = 0
script.Parent.DoorMain.CanCollide = true
else
print("Wrong card")
end
db = false
end
end)
Line 2, it doesnt even parent.
Whenever I give it via command bar, it doesnt work…?
game.ReplicatedStorage.WC_Rooms['Room201'].Parent = game.Players.wayIxn.Backpack
Whevener I do any ‘Alternative’ other than setting its default parent to StarterPack (which would never work for the game I’m working on) it simply doesnt open. Though when I change absolutely NOTHING it does.
Nvm - Had to parent it on the server side. Thank you SO MUCH for your 1h+ of time to help me. You’re truly amazing and I can’t thank you enough. :)))