Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

The weapon is seen in the studio but not in Roblox Player?

I have a script that what it does is that when the player enters a Team I give him a tool (weapon), but my problem is not the script. My problem is that when trying the weapon it looks good in the studio but when I try it in the Roblox Player does not load the weapon. That is, if he gives me the weapon but does not load the weapon (Do not see). Is it because I have it in a Folder in ReplicatedStorage?

2 comments

0

You're assuming every player that joins your game is a male.

0

I'm sorry I wanted to say that the script gives me the weapon when I enter the Team but it does not load me the Weapon (it is not seen)

1 answer

Put this in ServerScriptStorage:

local teams = game:GetService("Teams")
local weaponteam = --The team you want to give the weapon to.
local storage = game:GetService("ReplicatedStorage") --In-case it's in ReplicatedStorage
local weapon = --Locate the tool instance here.

local function GiveWeapon(plr)
	weapon:Clone().Parent = plr.Backpack --Lmao direct script cuz im lazy af
end)

game.Players.PlayerAdded:connect(function(plr)
	plr:GetPropertyChangedSignal("Team"):Connect(function()
		if plr.Team = weaponteam then
			GiveWeapon(plr)
		end
	end)
end)

@incapaz pls dont hurt me for spoon feeding.

This discussion is preserved as it was. New answers, comments, and votes are closed.